import request from "@/utils/request";

// 分页查询批次列表
export const _getBatchList = (queryDto) => request.post('/api/batch/list', queryDto)

// 根据id删除批次
export const _deleteBatch = (id) => request.delete(`/api/batch/delete/${id}`)

// 根据id获取批次详情
export const _getBatchById = (id) => request.get(`/api/batch/getById/${id}`)

// 更新批次
export const _updateBatch = (batch) => request.put('/api/batch/update', batch)

// 新增批次
export const _saveBatch = (batch) => request.post('/api/batch/save', batch)

// 保存批次衣服类型关联
export const _saveClothingStyle = (batchId, ids) => request.post(`/api/batch/saveClothingStyle/${batchId}`, ids)

// 删除批次衣服类型关联
export const _deleteClothingStyle = (batchId, ids) => request.post(`/api/batch/deleteClothingStyle/${batchId}`, ids)

// 获取当前学生可填写的批次信息
export const _getMyBatch = () => request.get('/api/batch/getMyBatch')


